package com.glory.huaweipda.model

import rxhttp.wrapper.param.RxHttp
import rxhttp.wrapper.param.toResponse

/**
 * @author HX
 * @date 2021/4/20
 * @desc 网络请求逻辑
 */
class LoginRepository {
    suspend fun login(userName: String, password: String): String {
        return RxHttp.postJson("http://220.248.78.106:3303/basis_service/" + "user/login")
            .add("username", userName)
            .add("password", password)
            .toResponse<String>()
            .await()
    }
}